package com.bzchao.doublecamera.utils;

public class TimeUtils {
    private long startTime; //起始时间
    private long endTime; //结束时间

    public static TimeUtils start() {
        TimeUtils timeUtils = new TimeUtils();
        timeUtils.startTime = System.currentTimeMillis(); //起始时间
        return timeUtils;
    }

    public void end() {
        this.endTime = System.currentTimeMillis(); //起始时间
    }

    public long endAndGetRunTime() {
        this.end();
        return endTime - startTime;
    }
}
